package com.funquer.cms.model;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 13-3-22
 * Time: 下午5:20
 * To change this template use File | Settings | File Templates.
 */
@javax.persistence.Table(name = "arcrank")
@Entity
@DynamicInsert(true)
@DynamicUpdate(true)
public class ArcrankEntity {
    private String id;

    @javax.persistence.Column(name = "id")
    @Id
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    private int rank;

    @javax.persistence.Column(name = "rank")
    @Basic
    public int getRank() {
        return rank;
    }

    public void setRank(int rank) {
        this.rank = rank;
    }

    private String membername;

    @javax.persistence.Column(name = "membername")
    @Basic
    public String getMembername() {
        return membername;
    }

    public void setMembername(String membername) {
        this.membername = membername;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ArcrankEntity that = (ArcrankEntity) o;

        if (rank != that.rank) return false;
        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (membername != null ? !membername.equals(that.membername) : that.membername != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + rank;
        result = 31 * result + (membername != null ? membername.hashCode() : 0);
        return result;
    }
}
